<script type="text/javascript">
$(document).ready(function() {
	$("#upload_img").select_image('newsletter_img', {fck_editor_url: '<?=base_url().'cms/'?>'});
});
</script>
<form action="<?=site_url(array('c' => 'cms_download','m' => 'add_document'))?>" method="post" id="documentForm" enctype="multipart/form-data">
<table class="form-table" cellpadding="5" cellspacing="0" style="width: 100%;">
	<tbody>
		<tr>
			<th>Title: </th>
	    	<td><input type="text" name="item_name" class="input-text required" value=""/></td>
	    </tr>
		<tr>
	    	<th>Group: </th>
	    	<td>
				<select name="item_gid" class="input-text required">
					<option value="">Please select</option>
					<?php foreach($groups as $item):?>
					<option value="<?=$item['id']?>">
						<?=$item['name']?>
					</option>
					<?php endforeach;?>
				</select>
			</td>
	    </tr>
		<tr>
			<th>File Upload: </th>
	    	<td><input type="file" id="fileUpload1" name="fileupload1" class="input-text required" value="" size="36"/></td>
	    </tr>
	    <tr>
	    	<th>Description: </th>
	    	<td><textarea name="item_description" rows="7" cols="37" class="input-textarea"></textarea></td>
	    </tr>
	</tbody>
</table>
</form>